package com.newlink.building.common_base.utils.countrycode

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.newlink.building.common_base.R
import com.newlink.building.common_base.model.bean.CountryCodeBean

/**
 * @Author: Jake
 * @Date: 2023-12-28
 * @Description:
 */
class Base_CountryCodeAdapter(data: MutableList<CountryCodeBean>) :
    BaseQuickAdapter<CountryCodeBean, BaseViewHolder>(R.layout.country_code_item, data) {


    private var mCurrentCountry: CountryCodeBean? = null

    fun setCurrentCountry(position: Int) {
        notifyDataSetChanged()
    }

    override fun convert(holder: BaseViewHolder, item: CountryCodeBean) {
        holder.setText(R.id.country_name, item.area)
        holder.setText(R.id.country_code, item.code)
    }
}